package com.bingxue.edu.management.shop.model.query;

import com.bingxue.edu.management.education.model.query.CommonClassQuery;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@Schema(description = "销售顾问业绩查询条件")
public class SellRecordQuery extends CommonClassQuery {

    @Schema(description = "开始时间")
    private LocalDate startDate;

    @Schema(description = "结束时间")
    private LocalDate endDate;

    @Schema(description = "销售顾问id")
    private List<String> sellerId;

    @Schema(description = "是否有效")
    private Boolean valid;

    public LocalDate getEndDate() {
        return endDate == null ? null : endDate.plusDays(1);
    }
}
